package com.hoshino.momochi.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Collections;
import java.util.Date;

@Data
public class Subscribe {
    @TableId(value = "id", type = IdType.AUTO)
//    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private Long id;

    @TableField("user_id")
    private Long userId;

    @TableField("collection_id")
    private Long collectionId;

    @TableField("create_time")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField("isDelete")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) // 禁止 序列化
    private int isDelete;

    @TableField(exist = false)
    private CollectionBlog collectionBlog;
}
